package com.patMall.mapper;

import com.patMall.entity.Commodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommodityMapper {
    List<Commodity> selectAllByCommodity(int state);
    List<Commodity> selectAllCommodity();
    Commodity getCommodityId(Integer commodityId);
    Commodity getCommodityByCommodityId(Commodity commodity);
    int insertCommodity(Commodity commodity);
    int updateCommodity(Commodity commodity);
    int deleteCommodity(Integer commodityId);
    List<Commodity> selectByStoreId(Integer storeId);
    List<Commodity> getAllByCommodityName(String commodityName);
    List<Commodity> selectByCommodity(Commodity commodity);
    List<Commodity> selectStoreCommodityAll(@Param("storeId") Integer storeId,@Param("sorting_p") int sorting_p,@Param("sorting_t") int sorting_t);
    List<Commodity> selectStoreCommodity();
}